package com.vca.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.vca.common.model.talk.Talk;
import com.vca.common.request.AdminCommonRequest;
import com.vca.common.request.PageParamRequest;
import com.vca.common.request.TalkAddRequest;
import com.vca.common.response.AdminHeaderResponse;
import com.vca.common.response.TalkAdminListResponse;
import com.vca.common.response.TalkAdminResponse;
import com.vca.common.response.TalkResponse;

import java.util.List;

/**
 * <p>
 * 讲座表 服务类
 * </p>
 *
 * @author chenBing
 * @since 2022-11-03
 */
public interface TalkService extends IService<Talk> {

    /**
     * @Description:讲座分页列表
     * @Author: chenBing
     * @Date: 2022/11/3
     */
    PageInfo<TalkResponse> getList(String language,PageParamRequest pageParamRequest);

    List<TalkResponse> getListCalendar(String date);

    /**
     * @Description:讲座详情
     * @Author: chenBing
     * @Date: 2022/11/3
     */
    TalkResponse info(String language,Long talkId);

    /**
     * 讲座管理
     * @author Li
     * @date 2022/11/14 10:01
     */
    PageInfo<TalkAdminListResponse> getAdminList(AdminCommonRequest request, PageParamRequest pageParamRequest);
    /**
     * 修改排序
     * @param talkId 讲座id
     * @param sort 排序
     * @author Li
     * @date    2022/11/18 15:16
     * @return
     */
    boolean updateSort(Integer talkId, Integer sort);

    /**
     * 修改限量
     * @param talkId 讲座id
     * @param seatCount 限量
     * @author Li
     * @date    2022/11/18 15:16
     * @return
     */
    boolean updateSeatCount(Integer talkId, Integer seatCount);

    /**
     * 上架讲座
     * @param talkId 讲座id
     * @author Li
     * @date    2022/11/18 15:16
     * @return
     */
    boolean courseOnShell(Integer talkId);

    /**
     * 下架讲座
     * @param talkId 讲座id
     * @author Li
     * @date    2022/11/18 15:16
     * @return
     */
    boolean courseOffShell(Integer talkId);

    /**
     * 添加讲座
     * @param request
     * @author Li
     * @date 2022/11/18 15:38
     * @return
     */
    boolean addTalk(TalkAddRequest request);

    /**
     * 根据id获取讲座信息
     * @param talkId
     * @author Li
     * @date    2022/11/22 10:25
     * @return
     */
    TalkAdminResponse getTalk(Long talkId);

    /**
     * @Description:修改讲座
     * @Author: Li
     * @Date: 2022/11/22 14:56
     */
    boolean updateTalk(TalkAddRequest request);

    /**
     * 获得讲座头部数据
     * @author Li
     * @date 2022/11/23 09:16
     * @return
     */
    List<AdminHeaderResponse> getHeader();

    /**
     * 删除讲座
     * @author Li
     * @date 2022/11/23 09:16
     * @return
     */
    boolean deleteTalk(Long talkId);

    List<Talk> getTalksAndDelete(List<Long> ids);

    /**
     *@Description:查询当前月份的日程
     *@author:chenbing
     *@date 2023/1/28 16:10
     */
    List<Integer> getCalendar(Integer month,Integer year);

    TalkResponse infoS(Long talkId, String type, String date);
}
